<!DOCTYPE html>
<html>
<head>
<title>Daftar Anggota</title>
<link href="View/bootstrap/css/bootstrap.css" rel="stylesheet">
<link href="View/bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
<link  href="View/bootstrap/js/bootstrap.min.js" rel="stylesheet"/>
<script type="text/javascript" src="View/bootstrap/js/jquery-latest.js"></script>
</head>
<?php
	include_once '../model/member.php';
		session_start();
			if (!isset($_SESSION["id_user"])){
	include '/content/content_header_guest.php';
			} else {
	include '/content/content_header_user.php';
					}
?>
<body>
	<div class="container-fluid">
		<div class="row-fluid">
			<div class="span9">
				<table class="table table-hover">
					<th>&nbsp;</th>
					<th>Nama Toko</th>
					<th>Alamat</th>
					<th>Telepon</th>
					<th>Kota</th>
					<th>Email</th>
					<th>Kode Pos</th>
					<th>&nbsp;</th>
					<?php 
					$member = new Member();
					if (isset($_GET['delete'])) {
						$member -> deleteMember($_GET['delete']);
					}
						$member2 = $member-> getMember();
						if (!empty($member2))
						{
							foreach ($member2 as $id_user => $member2)
							{
								echo 
								'<tr>
									<td><a href="../index.php?member='.$member2->id_user.'" class="btn" rel="tooltip" title="Detail"><i class="icon-arrow-right"></i></a></td>
									<td>'.$member2->namadepan.'</td>
									<td>'.$member2->alamatuser.'</td>
									<td>'.$member2->notelpuser.'</td>
									<td>'.$member2->kotauser.'</td>
									<td>'.$member2->emailuser.'</td>
									<td>'.$member2->kodeposuser.'</td>
									<td><a href="list_member.php?delete='.$member2->id_user.'"><i class="icon-trash"></i></a>&nbsp; &nbsp; &nbsp;<a href="form_edit_member.php?edit='.$member2->id_user.'"><i class="icon-edit"></i></a></td>
								</tr>';
							}
						}
					?>
				</table>
			</div>
			<div class="span3">
				<?php 
					include '/content/content_mini_list_produk.php';
				?>
				<?php
					include '/content/content_banner.php';
				?>
			</div>
		</div>
    </div>
</body>
<?php
include '/content/content_footer_site_map.php';
include '/content/content_footer.php';
?>